/**
 * Created by qingteng.wang on 2017/1/9.
 */

+function ($) {
    $(function () {
        const $khMeetPage = $('#khMeetPage');
        const $khmeetdatelist = $khMeetPage.find('.kh-meetdate-list');

        $khmeetdatelist.each((i, list) => {
            let $list = $(list);
            let $mdlitem = $(list).find('.kh-mdl-item');
            let len = $mdlitem.size();
            let $khmdlbody = $(list).find('.kh-mdl-body');
            if(len < 4){
                $khmdlbody.css({
                    'paddingTop':29+'px',
                    'paddingBottom':29+'px',
                })
            }
            if(len > 3 && len < 7){
                $khmdlbody.css({
                    'paddingTop':8+'px',
                    'paddingBottom':8+'px',
                })
            }
            $mdlitem.each((itemi, item) => {
                let $item = $(item);
                let index = itemi + 1;
                let yushu = index % 3;
                switch (yushu) {
                    case 0:
                        $item.addClass('w460');
                        break;
                    case 1:
                        $item.addClass('w190');
                        break;
                    case 2:
                        $item.addClass('w210');
                        break;
                }
            });
        });
    });
}(jQuery);